package sv.gob.mh.dgii.model;

// Generated 06-10-2011 08:49:21 AM by Hibernate Tools 3.2.5.Beta

import java.util.Date;
import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.EmbeddedId;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * GdDocPerfil generated by hbm2java
 */
@Entity
@Table(name = "GD_DOC_PERFIL",schema="GDOCCALIDAD")
public class GdDocPerfil implements java.io.Serializable {

	private GdDocPerfilId id;
	private GdPerfiles gdPerfiles;
	private GdMaestroDoc gdMaestroDoc;
	private String cusuModif;
	private Date fmodif;

	public GdDocPerfil() {
	}

	public GdDocPerfil(GdDocPerfilId id, GdPerfiles gdPerfiles,
			GdMaestroDoc gdMaestroDoc, String cusuModif, Date fmodif) {
		this.id = id;
		this.gdPerfiles = gdPerfiles;
		this.gdMaestroDoc = gdMaestroDoc;
		this.cusuModif = cusuModif;
		this.fmodif = fmodif;
	}
	
	@EmbeddedId
	@AttributeOverrides( {
			@AttributeOverride(name = "iperfil", column = @Column(name = "I_PERFIL", nullable = false, precision = 10, scale = 0)),
			@AttributeOverride(name = "ndocumento", column = @Column(name = "N_DOCUMENTO", nullable = false, length = 9)) })
	public GdDocPerfilId getId() {
		return this.id;
	}

	public void setId(GdDocPerfilId id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "I_PERFIL", nullable = false, insertable = false, updatable = false)
	public GdPerfiles getGdPerfiles() {
		return this.gdPerfiles;
	}

	public void setGdPerfiles(GdPerfiles gdPerfiles) {
		this.gdPerfiles = gdPerfiles;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "N_DOCUMENTO", nullable = false, insertable = false, updatable = false)
	public GdMaestroDoc getGdMaestroDoc() {
		return this.gdMaestroDoc;
	}

	public void setGdMaestroDoc(GdMaestroDoc gdMaestroDoc) {
		this.gdMaestroDoc = gdMaestroDoc;
	}

	@Column(name = "C_USU_MODIF", nullable = false, length = 30)
	public String getCusuModif() {
		return this.cusuModif;
	}

	public void setCusuModif(String cusuModif) {
		this.cusuModif = cusuModif;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "F_MODIF", nullable = true, length = 7)
	public Date getfmodif() {
		return this.fmodif;
	}

	public void setfmodif(Date fmodif) {
		this.fmodif = fmodif;
	}

}
